package com.dwms.controller;

import com.dwms.entity.PageResponse;
import com.dwms.entity.Result;
import com.dwms.entity.declare.jeOutboundDetail.request.JeOutboundDetailQueryRequest;
import com.dwms.entity.declare.jeOutboundDetail.response.JeOutboundDetailResponse;
import com.dwms.feign.declare.JeOutboundDetailFeignClient;
import com.dwms.utils.WebUtil;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: JeOutboundDetailController
 * @Description: JeOutboundDetail
 * @Create 2025-09-28 20:48:56
 * @Author WH
 * @Since 1.0.0
**/
@RestController
@RequestMapping(value = "/declare/jeOutboundDetail")
@RequiredArgsConstructor
public class JeOutboundDetailController {

    private final HttpServletRequest request;
    private final JeOutboundDetailFeignClient jeOutboundDetailFeignClient;

    /**
     * 分页查询
     *
     * @param query
     *          查询参数
     * @return
     */
    @PostMapping("/findPage")
    public Result<PageResponse<JeOutboundDetailResponse>> findPage(@RequestBody JeOutboundDetailQueryRequest query) {
        WebUtil.getAdminRequest(request, query);
        return jeOutboundDetailFeignClient.findPage(query);
    }

}
